const dbpool=require("../config/dbpoolconfig");
const stuController={
  addStudent(req,res){
    let username=req.query.username;
    let pwd=req.query.pwd;
    let email=req.query.email;
    dbpool.connect("INSERT INTO t_user VALUES(?,?,?,?)",
      [null,username,pwd,email],
      (err,data)=>{
        // console.log(err);node
        // console.log(data);
        if(!err){
          // alert("注册成功请登录")
          res.redirect("index1.html");
        }else{
          res.redirect("index4.html");
        }
      }
    )
    // console.log(stuname);
  }
}
module.exports=stuController;
